package com.dhcc.DRGsHosp.core.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.openkoala.koala.commons.domain.KoalaLegacyEntity;

/**
 * @title		:CostSub.java
 * @description	:
 * @author		:lileizheng
 * @date		:2015年4月2日
 * @version     :1.0
 * @copyright   :DHCC 2013-2014 
 */
@Entity
@Table (name = "T_COSTSUB", schema = "DRGs")
public class CostSub extends KoalaLegacyEntity {

private static final long serialVersionUID = -2700241427681303048L;
//费用分类代码
@Id
@Column(name = "COST_SUB_CODE" , nullable = false)
private String costSubcode;

//Par费用大类代码
@Column(name = "PARCOST_CATE_CODE")
private String parcostCatecode;

//费用分类描述
@Column(name = "COST_SUB_DESC" , nullable = false)
private String costSubdesc;

//费用分类别名
@Column(name = "COST_SUB_ALIAS")
private String costSubAlias;

//DRG权重计算费用类型代码
@Column(name = "DCC_CODE")
private String dccCode;

//医嘱费用表代码
@Column(name = "ORDER_SCODE")
private String orderScode;

//是否费用明细(是否用于计算费用和):1为是，0为不是
@Column(name = "IS_DETAIL")
private String isDetail;

//质控费用编码
@Column(name = "COST_CODE_QUALITY")
private String costCodeQuality;

public String getIsDetail() {
	return isDetail;
}

public void setIsDetail(String isDetail) {
	this.isDetail = isDetail;
}

public String getOrderScode() {
	return orderScode;
}

public void setOrderScode(String orderScode) {
	this.orderScode = orderScode;
}

public String getCostSubcode() {
	return costSubcode;
}

public void setCostSubcode(String costSubcode) {
	this.costSubcode = costSubcode;
}

public String getParcostCatecode() {
	return parcostCatecode;
}

public void setParcostCatecode(String parcostCatecode) {
	this.parcostCatecode = parcostCatecode;
}

public String getCostSubdesc() {
	return costSubdesc;
}

public void setCostSubdesc(String costSubdesc) {
	this.costSubdesc = costSubdesc;
}

public String getCostSubAlias() {
	return costSubAlias;
}

public void setCostSubAlias(String costSubAlias) {
	this.costSubAlias = costSubAlias;
}

public String getDccCode() {
	return dccCode;
}

public void setDccCode(String dccCode) {
	this.dccCode = dccCode;
}

public String getCostCodeQuality() {
	return costCodeQuality;
}

public void setCostCodeQuality(String costCodeQuality) {
	this.costCodeQuality = costCodeQuality;
}

/**
 * @param costSubcode
 * @param parcostCatecode
 * @param costSubdesc
 * @param costSubAlias
 * @param dccCode
 * @param orderScode
 */
public CostSub(String costSubcode, String parcostCatecode, String costSubdesc, String costSubAlias, String dccCode,
		String orderScode) {
	super();
	this.costSubcode = costSubcode;
	this.parcostCatecode = parcostCatecode;
	this.costSubdesc = costSubdesc;
	this.costSubAlias = costSubAlias;
	this.dccCode = dccCode;
	this.orderScode = orderScode;
}


public CostSub() {
	super();
}

@Override
public Serializable getId() {
	return this.costSubcode;
}

@Override
public String[] businessKeys() {
	return null;
}

/**  
 *  @Description：
 *  @Author ChenHanlin  
 *  @see java.lang.Object#hashCode()  
 */
@Override
public int hashCode() {
	final int prime = 31;
	int result = 1 ;
	result = prime * result + ((costSubcode == null) ? 0 : costSubcode.hashCode());
	return result;
}

/**  
 *  @Description：
 *  @Author ChenHanlin  
 *  @see java.lang.Object#equals(java.lang.Object)  
 */
@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (getClass() != obj.getClass())
		return false;
	CostSub other = (CostSub) obj;
	if (costSubcode == null) {
		if (other.costSubcode != null)
			return false;
	} else if (!costSubcode.equals(other.costSubcode))
		return false;
	return true;
}


}

